﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LeMigue.TeamPortal.Base.Biz.Interface;
using LeMigue.TeamPortal.Base.View;
using LeMigue.Scrum.Iterface.Service;
using LeMigue.Scrum.Iterface.Model;
using LeMigue.TeamPortal.Base.Service;


namespace LeMigue.TeamPortal.Base.Biz.Implement
{
    public class IterationBiz : IIterationBiz
    {

        //TODO: implementar o unity
        private IIterationService _iterationService = FactoryService.IterationService;



        public IList<IterationView> List(Team team, Iteration select)
        {
            return _iterationService.List(team).Select(i => new IterationView(i, select == null ? false : (select.Equals(i)))).ToList();
            
        }

        public IList<IterationView> List(IList<Iteration> iteracoes, Iteration select)
        {
            return iteracoes.Select(i => new IterationView(i, select == null ? false : (select.Equals(i)))).ToList();
        }
    }
}
